<template>
    <div class="public-common">
        <!--系统设置-基本类型列表-->
        <div class="public-title">基本类型列表</div>
        <div class="public-searchbox">
            <el-row>
                <el-col :span="6">
                    <el-input placeholder="请输入内容" size="mini" v-model="form.test" class="input-with-select"/>
                </el-col>
                <el-col :span="18">
                    <el-button type="primary" size="mini" icon="el-icon-search" style="margin-left:10px;">搜索</el-button>
                    <el-button type="success" size="mini" icon="el-icon-edit-outline">新建</el-button>
                </el-col>
            </el-row>
        </div>
        <div class="public-scroll" style="height:calc(100% - 120px)">
            <el-table :data="tabledata" size="mini" border stripe header-row-class-name="textcenter">
                
                <el-table-column
                    label="类型名称">
                    <template slot-scope="scope">
                        {{scope.row.carId}}
                    </template>
                </el-table-column>                
                <el-table-column
                    label="类型分类">
                    <template slot-scope="scope">
                        {{scope.row.carType}}
                    </template>
                </el-table-column>
                <el-table-column
                    label="使用状态">
                    <template slot-scope="scope">
                        {{scope.row.carType}}
                    </template>
                </el-table-column>
                <el-table-column
                    label="排序号">
                    <template slot-scope="scope">
                        {{scope.row.carType}}
                    </template>
                </el-table-column>
                <el-table-column
                    label="备注">
                    <template slot-scope="scope">
                        {{scope.row.carType}}
                    </template>
                </el-table-column>
                <el-table-column
                    label="操作" fixed="right">
                    <template slot-scope="scope">
                        <el-button type="primary" size="mini">查看</el-button>
                    </template>
                </el-table-column> 
                
            </el-table>
        </div>
        <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page.now"
        :page-sizes="page.sizes"
        :page-size="page.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total" style="margin-top:10px;">
        </el-pagination>
        <!--dialog-->
        <el-dialog title="基本类型信息"  :visible.sync="dialog.isVisible" width="40%" top="10vh">
            <el-form label-width="90px" size="mini">
                <el-form-item label="类型分类">
                    <el-select v-model="dialog.test" placeholder="请选择" style="width:100%;">
                        <el-option
                        v-for="item in select.kinds"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value">
                        </el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="类型名称">
                    <el-input v-model="dialog.test"></el-input>
                </el-form-item>
                <el-form-item label="词典备注">
                    <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="dialog.test"></el-input>
                </el-form-item>
                <el-form-item label="分类排序号">
                    <el-input v-model="dialog.test"></el-input>
                </el-form-item>
                <el-form-item label="使用状态">
                    <el-checkbox v-model="dialog.checked">启用</el-checkbox>
                </el-form-item>
            </el-form>
            <div class="textcenter">
                <el-button type="primary" size="mini">确定</el-button>  
                <el-button type="info" @click="dialog.isVisible = false" size="mini">返回</el-button>
            </div>
        </el-dialog>
    </div>
</template>
<script>
export default {
    data(){
        return {
            form:{
                changevalue:"全部",
                test:'',
                carid:''
            },
            tabledata:[
                {carId:1}
            ],
            page:{
              now:1,
              pagesize:10,
              sizes:[2,10, 20, 50, 100],
              total:0,
              key:''
            },
            select:{
                kinds:[
                    {label:'车辆类型',value:'车辆类型'},
                    {label:'计价器类型',value:'计价器类型'},
                    {label:'顶灯类型',value:'顶灯类型'},
                    {label:'车辆服务设施',value:'车辆服务设施'},
                    {label:'服务监督卡类型',value:'服务监督卡类型'},
                    {label:'车队处理结果',value:'车队处理结果'},
                    {label:'月税费标准',value:'月税费标准'},
                    {label:'设备类型',value:'设备类型'},
                    {label:'设备状态',value:'设备状态'},
                    {label:'投诉方式',value:'投诉方式'},
                    {label:'公章类型',value:'公章类型'},
                    {label:'请假类别',value:'请假类别'},
                    {label:'车辆更新方案',value:'车辆更新方案'},
                    {label:'管理处结果',value:'管理处结果'},
                    {label:'投保公司',value:'投保公司'},
                    {label:'银行名称',value:'银行名称'},
                    {label:'好事类型',value:'好事类型'},
                    {label:'车辆颜色',value:'车辆颜色'},
                    {label:'业务流程类型',value:'业务流程类型'},
                    {label:'车载终端报备',value:'车载终端报备'},
                    {label:'其他费用类型',value:'其他费用类型'},
                    {label:'GPS提供商',value:'GPS提供商'},
                    {label:'失物类别',value:'失物类别'}
                ]
            },
            dialog:{
                isVisible:false,
                checked:true,
                test:''
            }
        }
    },
    mounted(){
        
    },
    methods:{
        
        search(){
            alert("search")
        },
        //分页
        handleSizeChange(pagesize){
            this.page.pagesize = pagesize;
            this.search(true,true);
        },
        handleCurrentChange(pageno){
            this.page.now = pageno;
            this.search(true,true);
        }

    }
}
</script>
<style lang="scss">

</style>